1. Field of the Invention
The present invention relates generally to systems and methods for enhancing the functionality of microcontrollers. More specifically, it relates to an enhanced microcontroller system used in control applications such as automotive applications, and methods thereof.
2. Prior Art
Many circuit applications are known to exist that require determination of the frequency, phase & amplitude of an analog signal for precise event control. In the automotive industry, for example, a variety of vehicle operation sensors (e.g., engine sensors) typically produce analog signals that are used by one or more on-board processors to control various aspects of a vehicle's events operation.
In some cases, information may be extracted from the analog signal by interpreting its frequency, phase and amplitude which may vary with engine/vehicle operation. One commonly employed technique for extracting information of an analog signal requires first converting the analog signal to a digital signal, and then processing the converted digital signal in a known manner to determine the relevant data. Such a technique is commonly employed in systems that include a microprocessor, particularly since microprocessors are typically equipped with a number of analog-to-digital (A/D) inputs operable to convert analog signals to digital signals for further processing by the microprocessor.
Pulse-width modulation (PWM) of a signal or power source involves the modulation of its duty cycle, to either convey information over a communications channel or control the amount of power sent to a load. PWM is essentially a way of digitally encoding analog signal levels. Through the use of high-resolution counters, for example, the duty cycle of a square wave is modulated to encode a specific analog signal level. The PWM signal is still digital because, at any given instant of time, the full DC supply is either fully on or fully off. The voltage or current source is supplied to the analog load by means of a repeating series of on and off pulses. The on-time is the time during which the DC supply is applied to the load, and the off-time is the period during which that supply is switched off. Given a sufficient bandwidth, any analog value can be encoded with PWM.
By controlling analog circuits digitally, system costs and power consumption can be drastically reduced. What's more, many microcontrollers and Digital Signal processors (DSPs) already include on-chip PWM controllers, making implementation easy.
One of the advantages of PWM is that the signal remains digital all the way from the processor to the controlled system; no digital-to-analog conversion is necessary. By keeping the signal digital, noise effects are minimized. Increased noise immunity is yet another benefit of choosing PWM over analog control, and is the principal reason PWM is sometimes used for communication. Switching from an analog signal to PWM can increase the length of a communications channel dramatically.
One limitation of typical PWM usage is that it requires real-time processing for a precise event control and also manual checking of the analog status of external components, such as Integrated Circuits (ICs) controlled by PWM output. Examples of IC controlled by PWM with analog feedback include: SmartPower lighting controller for lighting control, H Bridge driver (needle motor control), Cooling fan motor control, and valve control. This being the case, frequent checking of such parameters may often have a negative effect on the microprocessor performance, as it may burden the processor with frequent demanding requests.
Thus, there is a need in the art to enable the automated checking of the analogs status of external ICs controlled by PWM outputs, as well as methods thereof to offload the CPU for reaching real-time performance.